package com.example.dsplatform.Controller;

import com.example.dsplatform.Dao.Mapper.UserMapper;
import com.example.dsplatform.pojo.Entity.Student;
import com.example.dsplatform.Service.ipml.UserServiceImpl;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author wdx3004
 */

@RestController

public class TeacherController {
    @Autowired
    UserServiceImpl userService;
    @Autowired
    UserMapper userMapper;
    @PostMapping("/teacher")
    public String insertTest(Integer id,String name){
        userService.insert(id,name);
        return "success";
    }

    @DeleteMapping("/teacher")
    public String deletebyID(Integer id){
        userMapper.deleteById(id);
        return "delete success";
    }

}
